\hypertarget{tcp__handler_8c}{}\section{/home/vedant/\+Programming/projects/pid-\/tuning-\/gui/esp\+\_\+codes/components/pid\+\_\+plotter/tcp\+\_\+handler.c File Reference}
\label{tcp__handler_8c}\index{/home/vedant/\+Programming/projects/pid-\/tuning-\/gui/esp\+\_\+codes/components/pid\+\_\+plotter/tcp\+\_\+handler.\+c@{/home/vedant/\+Programming/projects/pid-\/tuning-\/gui/esp\+\_\+codes/components/pid\+\_\+plotter/tcp\+\_\+handler.\+c}}
{\ttfamily \#include \char`\"{}tcp\+\_\+handler.\+h\char`\"{}}\newline
Include dependency graph for tcp\+\_\+handler.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tcp__handler_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{tcp__handler_8c_a6be7633691ba5c012155871a84ade82e}{tcp\+\_\+network\+\_\+manager} (struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$nm)
\begin{DoxyCompactList}\small\item\em Manages T\+CP connection to the server. \end{DoxyCompactList}\item 
int \hyperlink{tcp__handler_8c_a0ca62b309e39660b29ee7605b099ee54}{tcp\+\_\+send\+\_\+data} (struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$nm, char $\ast$payload)
\begin{DoxyCompactList}\small\item\em Sends data to the server through a T\+CP socket. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{tcp__handler_8c_ae58555e8930155fcea5b1d16915db87b}{tcp\+\_\+recieve\+\_\+data} (struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$nm)
\begin{DoxyCompactList}\small\item\em Receives data from T\+CP server. \end{DoxyCompactList}\item 
void \hyperlink{tcp__handler_8c_a6d6a248c21ebfece9f52fa7b580fabb5}{tcp\+\_\+close\+\_\+network\+\_\+manager} (struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$nm)
\begin{DoxyCompactList}\small\item\em Shutdown active connection, deallocate memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function Documentation}
\mbox{\Hypertarget{tcp__handler_8c_a6d6a248c21ebfece9f52fa7b580fabb5}\label{tcp__handler_8c_a6d6a248c21ebfece9f52fa7b580fabb5}} 
\index{tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}!tcp\+\_\+close\+\_\+network\+\_\+manager@{tcp\+\_\+close\+\_\+network\+\_\+manager}}
\index{tcp\+\_\+close\+\_\+network\+\_\+manager@{tcp\+\_\+close\+\_\+network\+\_\+manager}!tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}}
\subsubsection{\texorpdfstring{tcp\+\_\+close\+\_\+network\+\_\+manager()}{tcp\_close\_network\_manager()}}
{\footnotesize\ttfamily void tcp\+\_\+close\+\_\+network\+\_\+manager (\begin{DoxyParamCaption}\item[{struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$}]{nm }\end{DoxyParamCaption})}



Shutdown active connection, deallocate memory. 


\begin{DoxyParams}{Parameters}
{\em nm} & \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} struct which contains connection info \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}
\mbox{\Hypertarget{tcp__handler_8c_a6be7633691ba5c012155871a84ade82e}\label{tcp__handler_8c_a6be7633691ba5c012155871a84ade82e}} 
\index{tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}!tcp\+\_\+network\+\_\+manager@{tcp\+\_\+network\+\_\+manager}}
\index{tcp\+\_\+network\+\_\+manager@{tcp\+\_\+network\+\_\+manager}!tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}}
\subsubsection{\texorpdfstring{tcp\+\_\+network\+\_\+manager()}{tcp\_network\_manager()}}
{\footnotesize\ttfamily void tcp\+\_\+network\+\_\+manager (\begin{DoxyParamCaption}\item[{struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$}]{nm }\end{DoxyParamCaption})}



Manages T\+CP connection to the server. 


\begin{DoxyParams}{Parameters}
{\em nm} & \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} struct which contains necessary data for a T\+CP connection \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}
\mbox{\Hypertarget{tcp__handler_8c_ae58555e8930155fcea5b1d16915db87b}\label{tcp__handler_8c_ae58555e8930155fcea5b1d16915db87b}} 
\index{tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}!tcp\+\_\+recieve\+\_\+data@{tcp\+\_\+recieve\+\_\+data}}
\index{tcp\+\_\+recieve\+\_\+data@{tcp\+\_\+recieve\+\_\+data}!tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}}
\subsubsection{\texorpdfstring{tcp\+\_\+recieve\+\_\+data()}{tcp\_recieve\_data()}}
{\footnotesize\ttfamily char$\ast$ tcp\+\_\+recieve\+\_\+data (\begin{DoxyParamCaption}\item[{struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$}]{nm }\end{DoxyParamCaption})}



Receives data from T\+CP server. 


\begin{DoxyParams}{Parameters}
{\em nm} & \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} struct which contains connection info \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
char array which contains data received 
\end{DoxyReturn}
\mbox{\Hypertarget{tcp__handler_8c_a0ca62b309e39660b29ee7605b099ee54}\label{tcp__handler_8c_a0ca62b309e39660b29ee7605b099ee54}} 
\index{tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}!tcp\+\_\+send\+\_\+data@{tcp\+\_\+send\+\_\+data}}
\index{tcp\+\_\+send\+\_\+data@{tcp\+\_\+send\+\_\+data}!tcp\+\_\+handler.\+c@{tcp\+\_\+handler.\+c}}
\subsubsection{\texorpdfstring{tcp\+\_\+send\+\_\+data()}{tcp\_send\_data()}}
{\footnotesize\ttfamily int tcp\+\_\+send\+\_\+data (\begin{DoxyParamCaption}\item[{struct \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} $\ast$}]{nm,  }\item[{char $\ast$}]{payload }\end{DoxyParamCaption})}



Sends data to the server through a T\+CP socket. 


\begin{DoxyParams}{Parameters}
{\em nm} & A pointer to \hyperlink{structtcp__network__data}{tcp\+\_\+network\+\_\+data} struct \\
\hline
{\em payload} & char array which contains data to be sent \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int -\/ returns -\/1 if sending failed, number of bytes sent if successfully sent the data 
\end{DoxyReturn}
